package com.xnyzc.lhy.order.feign.fallback.heli;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.common.penum.EErrorCode;
import com.xnyzc.lhy.order.feign.heli.IUserToHeLiService;
import com.xnyzc.lhy.resource.entity.worksheet.param.heli.LoginSynchronousParam;
import com.xnyzc.lhy.resource.entity.worksheet.param.heli.RoleSynchronousParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 服务的降级， 如出现远程调用失败，则会触发该回调
 *
 * @author haoyfa
 */
@Slf4j
@Service
public class UserToHeLiServiceFallback implements IUserToHeLiService {
    @Override
    public Rv getLoginSynchronous(LoginSynchronousParam param) {
        return Rv.wrap(EErrorCode.gatewayDeny, new Object());
    }

    @Override
    public Rv getRoleSynchronous(RoleSynchronousParam param) {
        return Rv.wrap(EErrorCode.gatewayDeny, new Object());
    }
}
